<!DOCTYPE html>
<html class="no-js">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>org.jetbrains.kotlinx.mcp.shared</title>
    <link href="../../images/logo-icon.svg" rel="icon" type="image/svg">
    <script>var pathToRoot = "../../";</script>
    <script>document.documentElement.classList.replace("no-js","js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async="async"></script>
<script type="text/javascript" src="../../scripts/sourceset_dependencies.js" async="async"></script>
<link href="../../styles/style.css" rel="Stylesheet">
<link href="../../styles/main.css" rel="Stylesheet">
<link href="../../styles/prism.css" rel="Stylesheet">
<link href="../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../styles/font-jb-sans-auto.css" rel="Stylesheet">
<link href="../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../scripts/clipboard.js" async="async"></script>
<script type="text/javascript" src="../../scripts/navigation-loader.js" async="async"></script>
<script type="text/javascript" src="../../scripts/platform-content-handler.js" async="async"></script>
<script type="text/javascript" src="../../scripts/main.js" defer="defer"></script>
<script type="text/javascript" src="../../scripts/prism.js" async="async"></script>
<script type="text/javascript" src="../../ui-kit/ui-kit.min.js" async="async"></script>
<script type="text/javascript" src="../../scripts/symbol-parameters-wrapper_deferred.js" defer="defer"></script>
</head>
<body>
    <div class="root">
<nav class="navigation" id="navigation-wrapper">
    <div class="navigation--inner">
        <div class="navigation-title">
            <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
            <div class="library-name">
                    <a class="library-name--link" href="../../index.html">
                            MCP Kotlin SDK
                    </a>
            </div>
            <div class="library-version">
1.0-SNAPSHOT            </div>
        </div>
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":/main">jvm</button>
        </div>
    </div>
    <div class="navigation-controls">
        <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
        <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
    </div>
</nav>
        <div id="container">
            <div class="sidebar" id="leftColumn">
                <div class="sidebar--inner" id="sideMenu"></div>
            </div>
            <div id="main">
<div class="main-content" data-page-type="package" id="content" pageIds="MCP Kotlin SDK::org.jetbrains.kotlinx.mcp.shared////PointingToDeclaration//-251573632">
  <div class="breadcrumbs"><a href="../../index.html">MCP Kotlin SDK</a><span class="delimiter">/</span><span class="current">org.jetbrains.kotlinx.mcp.shared</span></div>
  <div class="cover ">
    <h1 class="cover"><span><span>Package-level</span></span> <span><span>declarations</span></span></h1>
  </div>
  <div class="tabbedcontent">
    <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="TYPE">Types</button><button class="section-tab" data-togglable="PROPERTY,EXTENSION_PROPERTY">Properties</button></div>
    <div class="tabs-section-body">
      <div data-togglable="TYPE">
        <h2 class="">Types</h2>
        <div class="table"><a data-name="-574616446%2FClasslikes%2F-251573632" anchor-label="ProgressCallback" id="-574616446%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-progress-callback/index.html"><span>Progress</span><wbr></wbr><span><span>Callback</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-574616446%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">typealias </span><a href="-progress-callback/index.html">ProgressCallback</a><span class="token operator"> = </span><span class="token punctuation">(</span><a href="../org.jetbrains.kotlinx.mcp/-progress/index.html">Progress</a><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></div><div class="brief "><p class="paragraph">Callback for progress notifications.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1766665532%2FClasslikes%2F-251573632" anchor-label="Protocol" id="1766665532%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-protocol/index.html"><span><span>Protocol</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1766665532%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">class </span><a href="-protocol/index.html">Protocol</a><span class="token operator">&lt;</span><a href="-protocol/index.html">SendRequestT</a><span class="token operator"> : </span><a href="../org.jetbrains.kotlinx.mcp/-request/index.html">Request</a><span class="token punctuation">, </span><a href="-protocol/index.html">SendNotificationT</a><span class="token operator"> : </span><a href="../org.jetbrains.kotlinx.mcp/-notification/index.html">Notification</a><span class="token punctuation">, </span><a href="-protocol/index.html">SendResultT</a><span class="token operator"> : </span><a href="../org.jetbrains.kotlinx.mcp/-request-result/index.html">RequestResult</a><span class="token operator">&gt;</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">_options<span class="token operator">: </span><a href="-protocol-options/index.html">ProtocolOptions</a><span class="token operator">?</span></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Implements MCP protocol framing on top of a pluggable transport, including features like request/response linking, notifications, and progress.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="679090184%2FClasslikes%2F-251573632" anchor-label="ProtocolOptions" id="679090184%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-protocol-options/index.html"><span>Protocol</span><wbr></wbr><span><span>Options</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="679090184%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">open </span><span class="token keyword">class </span><a href="-protocol-options/index.html">ProtocolOptions</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span class="token keyword">var </span>enforceStrictCapabilities<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator"> = </span><span class="token boolean">false</span><span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">var </span>timeout<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-duration/index.html">Duration</a><span class="token operator"> = </span>DEFAULT_REQUEST_TIMEOUT</span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Additional initialization options.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="545137502%2FClasslikes%2F-251573632" anchor-label="ReadBuffer" id="545137502%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-read-buffer/index.html"><span>Read</span><wbr></wbr><span><span>Buffer</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="545137502%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">class </span><a href="-read-buffer/index.html">ReadBuffer</a></div><div class="brief "><p class="paragraph">Buffers a continuous stdio stream into discrete JSON-RPC messages.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="1543575097%2FClasslikes%2F-251573632" anchor-label="RequestHandlerExtra" id="1543575097%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-request-handler-extra/index.html"><span>Request</span><wbr></wbr><span>Handler</span><wbr></wbr><span><span>Extra</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1543575097%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">class </span><a href="-request-handler-extra/index.html">RequestHandlerExtra</a></div><div class="brief "><p class="paragraph">Extra data given to request handlers.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="-787915675%2FClasslikes%2F-251573632" anchor-label="RequestOptions" id="-787915675%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-request-options/index.html"><span>Request</span><wbr></wbr><span><span>Options</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-787915675%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">data </span><span class="token keyword">class </span><a href="-request-options/index.html">RequestOptions</a><span class="token punctuation">(</span><span class="parameters "><span class="parameter "><span class="token keyword">val </span>onProgress<span class="token operator">: </span><a href="-progress-callback/index.html">ProgressCallback</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter "><span class="token keyword">val </span>timeout<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-duration/index.html">Duration</a><span class="token operator"> = </span>DEFAULT_REQUEST_TIMEOUT</span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Options that can be given per request.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="896178405%2FClasslikes%2F-251573632" anchor-label="Transport" id="896178405%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-transport/index.html"><span><span>Transport</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="896178405%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">interface </span><a href="-transport/index.html">Transport</a></div><div class="brief "><p class="paragraph">Describes the minimal contract for a MCP transport that a client or server can communicate over.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
<a data-name="948395256%2FClasslikes%2F-251573632" anchor-label="WebSocketMcpTransport" id="948395256%2FClasslikes%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-web-socket-mcp-transport/index.html"><span>Web</span><wbr></wbr><span>Socket</span><wbr></wbr><span>Mcp</span><wbr></wbr><span><span>Transport</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="948395256%2FClasslikes%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">class </span><a href="-web-socket-mcp-transport/index.html">WebSocketMcpTransport</a> : <a href="-transport/index.html">Transport</a></div><div class="brief "><p class="paragraph">Abstract class representing a WebSocket transport for the Model Context Protocol (MCP). Handles communication over a WebSocket session.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div data-togglable="PROPERTY">
        <h2 class="">Properties</h2>
        <div class="table"><a data-name="1130949820%2FProperties%2F-251573632" anchor-label="DEFAULT_REQUEST_TIMEOUT" id="1130949820%2FProperties%2F-251573632" data-filterable-set=":/main"></a>
          <div class="table-row" data-filterable-current=":/main" data-filterable-set=":/main">
            <div class="main-subrow keyValue ">
              <div class=""><span class="inline-flex">
                  <div><a href="-d-e-f-a-u-l-t_-r-e-q-u-e-s-t_-t-i-m-e-o-u-t.html"><span>DEFAULT_</span><wbr></wbr><span>REQUEST_</span><wbr></wbr><span>TIMEOUT</span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1130949820%2FProperties%2F-251573632"></span>
                    <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                  </span></span></div>
              <div>
                <div class="title">
                  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":/main"><div class="symbol monospace"><span class="token keyword">val </span><a href="-d-e-f-a-u-l-t_-r-e-q-u-e-s-t_-t-i-m-e-o-u-t.html">DEFAULT_REQUEST_TIMEOUT</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-duration/index.html">Duration</a></div><div class="brief "><p class="paragraph">The default request timeout.</p></div></div></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
    <div class="footer">
        <a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
        <span>© 2024 Copyright</span>
        <span class="pull-right">
            <span>Generated by </span>
            <a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
                <span>dokka</span>
            </a>
        </span>
    </div>
            </div>
        </div>
    </div>
</body>
</html>